package com.doge.controller.admin;

import com.doge.bean.base.BaseRespVo;
import com.doge.bean.bo.NoticeBo;
import com.doge.bean.pojo.notice.NoticeAdmin;
import com.doge.bean.vo.notice.NoticeListVo;
import com.doge.service.admin.lsnotice.LsnoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: doge
 * @description: 管理员通知
 * @author: Mr.Jiang
 * @create: 2021-12-04 13:57
 **/
@RestController
@RequestMapping("admin/profile")
public class LsnoticeController {
    @Autowired
    LsnoticeService lsnoticeService;
    @RequestMapping("lsnotice")
    public BaseRespVo lsnotice(Integer page,Integer limit,String title,String type,String sort,String order){
        NoticeListVo noticeListVo=lsnoticeService.list(page,limit,title,type,sort,order);
        return BaseRespVo.ok(noticeListVo);
    }
    @RequestMapping("catnotice")
    public BaseRespVo catnotice(@RequestBody NoticeAdmin noticeAdmin){
        lsnoticeService.update(noticeAdmin);
        return BaseRespVo.ok();
    }
    @RequestMapping("bcatnotice")
    public BaseRespVo bcatnotice(@RequestBody NoticeBo noticeBo){
        lsnoticeService.batchReadNotice(noticeBo);
        return BaseRespVo.ok();
    }
    @RequestMapping("brmnotice")
    public BaseRespVo brmnotice(@RequestBody NoticeBo noticeBo){
        lsnoticeService.brmnotice(noticeBo);
        return BaseRespVo.ok();
    }




}
